{%extends 'base_fresh.html'%}

{%block body%}

	<div class="header_con">
		<div class="header">
			<div class="welcome fl">欢迎来到天天生鲜!</div>
			<div class="fr">
				{%if request.session.user_name|default:'' != ''%}
				<div class="login_btn fl">
					欢迎您：<em>{{request.session.user_name}}</em>
					<span>|</span>
					<a href="/user/logout/">退出</a>
				</div>
				{%else%}
				<div class="login_btn fl">
					<a href="/user/login.html">登录</a>
					<span>|</span>
					<a href="/user/register.html/">注册</a>
				</div>
				{%endif%}
				<div class="user_link fl">
					<span>|</span>
					<a href="/user/info/">用户中心</a>
					<span>|</span>
					<a href="/cart/">我的购物车</a>
					<span>|</span>
					<a href="/myorder/">我的订单</a>
				</div>
			</div>
		</div>
	</div>
	<div class="search_bar clearfix">
		<a href="/" class="logo fl"><img src="/static/img/logo.png"></a>
{%if page_name == 1%}
		<div class="sub_page_name fl">|&nbsp;&nbsp;&nbsp;&nbsp;{{title}}</div>
		<div class="search_con fr">
			<form method='get' action="/search/" target="_blank">
			<input type="text" class="input_text fl" name="q" placeholder="搜索商品">
			<input type="submit" class="input_btn fr" value="搜索">
			</form>
		</div>
{%elif guest_cart|default:1 == 1%}
		<div class="search_con fl">
			<form method='get' action="/search/" target="_blank">
			<input type="text" class="input_text fl" name="q" placeholder="搜索商品">
			<input type="submit" class="input_btn fr" value="搜索">
			</form>
		</div>
		<div class="guest_cart fr">
			<a href="/cart/" class="cart_name fl">我的购物车</a>
			<div class="goods_count fl" id="show_count">{{cart_count |default:0}}</div>
		</div>
{%endif%}
	</div>


{%block content%}{%endblock content%}


{%endblock body%}